mod_LTLIBRARIES = mod_pyhp.la

mod_pyhp_la_LDFLAGS = -avoid-version -module

mod_pyhp_la_SOURCES = mod_pyhp.c \
		      pyhp_layer.c \
		      request.c \
                      config.c \
		      session.c \
		      db_session.c \
		      file_session.c \
                      logging.c \
                      cookies.c \
                      upload.c \
                      db.c

parser.c: parser.rl
	ragel $^ -o $@

if ENABLE_NEWPARSER
mod_pyhp_la_SOURCES += parser.c
else
mod_pyhp_la_SOURCES += old_parser.c
endif

if HAVE_MYSQL
mod_pyhp_la_SOURCES += db/pyhp_mysql.c
endif

INCLUDES = -I$(topsrcdir)/include -I.

check_PROGRAMS = pyhp_test_parser

pyhp_test_parser_SOURCES = parser.c

pyhp_test_parser_CPPFLAGS = -DPYHP_TEST

pyhp_test_parser_LDADD= $(LIBAPR_LIBS)
